loadAd

fun loadAd(adRequest: AdRequest, listener: InterstitialAdLoadListener)

Starts loading the ad on a background thread.

Parameters

adRequest

Data for targeting and ad configuration.

listener

InterstitialAdLoadListener to be invoked when the ad is loaded or loading fails.


suspend fun loadAd(adRequest: AdRequest): InterstitialAdLoadResult

Starts loading the ad on a background thread. Suspends until the result is available.

Return

InterstitialAdLoadResult.Success with InterstitialAd or InterstitialAdLoadResult.Failure with com.yandex.mobile.ads.common.AdRequestError.

Parameters

adRequest

Data for targeting and ad configuration.